package run.siyuan.jdk.设计模式.装饰模式.装饰模式案例4;

/**
 * @className: Client
 * @Description: TODO
 * @author: siyuan
 * @date: 2022/3/21 11:24 上午
 */
public class Client {
    public static void main(String[] args) {
        Component component = new ConcreteComponent();
        //第一次修饰
        component = new ConcreteDecorator1(component);
        //第二次修饰
        component = new ConcreteDecorator2(component);
        //修饰后运行
        component.operate();
    }
}
